home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 23
/
Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso
/
Aminet
/
text
/
edit
/
Smartindent.readme
< prev
next >
Wrap
Text File
|
1998-01-05
|
9KB
|
236 lines
Short: GoldED4 online code indention V37.6
Author: mshopf@informatik.uni-erlangen.de (Matthias Hopf)
Uploader: mshopf@informatik.uni-erlangen.de (Matthias Hopf)
Version: 37.6 beta
Type: text/edit
COPYIGHT
©1997 Matthias Hopf. All rights reserved.
Some routines are based partially on the public domain CLib package from
Andreas R. Kleinert. Thanx!
DISTRIBUTION
This package is distributed as FreeWare under the GNU license.
DESCRIPTION
This is an API client for GoldED 4 that will scan all entered text and
indent it according to its built-in rules. The scanner is quite versatile
and will also report several types of syntax errors.
Scanning will be done automatically when you press keys that could have
implications on the indentation of the current line. There is a new
ARexx command 'SMARTINDENT', too, with which you can explicitely start
the intendation process.
By default the installation script will map for the C-source filetype TAB
to 'SMARTINDENT LINE', alt-TAB to 'SMARTINDENT BLOCK', shift-TAB and
ctrl-TAB to 'TAB' and shift-ctrl-TAB to 'BACKTAB', so you don't lose the
tabulator availability.
Please note that the installer script does not yet create a
'smartindenting' Lisp source filetype. You will have to create it by hand.
I suggest a filename pattern like "(#?.scm|#?.lisp|#?Install#?)".
Source code is provided and almost cleaned up. I would love to add more
indentation semantic parsers for other languages :^) If you like to create
your own semantic parser, start with semantics_lisp.c - it is much simpler
than the c-source semantics parser... Information about the used macros
is provided in semantics.h, about the helper functions in util.h.
ToDo: Still does some intentions not as I would like it to, but it's
getting better. Better documentation needed. Configuration GUI
(showing indentation of example source) needed.
CURRENTLY KNOWN INDENTION MODES
C (C and C++ source)
Lisp (Lisp and derivates, e.g. Installer scripts)
INSTALLATION
Doubleclick at the installer script icon. It assumes that you already
have the envCPP filetype package installed.
For using Smartindent with Lisp source code you will at least have to
create a Lisp GoldED type by hand and add Smartindent to the api
configuration (arguments 'MODE Lisp'). Best configure TAB to invoke
'SMARTINDENT LINE' as well.
SYNTAX:
API startup arguments:
Template: MODE/K,DEBUG/N/K,CONFIG/M/N/K
MODE: Indention mode. When this argument is not specified or the
given mode is unknown, a list of all known indention modes
is shown in a requester.
DEBUG: One nummeric argument that specifies the debug level
(see util.h for more information)
CONFIG: Currently 7 (or less) integer values that specify
(in this order):
- C-code Example:
if (x)
....x = x+1; - Block indentation level (default 4)
switch (x)
..{ - Brace indentation level (default 0, here: 2)
x = x + 1;
<- case 1: - Label indentation level (default -2)
long int
..value; - Continued statement level (default 2)
value =
.0; - Continued equation level (default 1)
..../* xx */ - Standard comment level (default 4)
x=0;..../* x */ - (Absolute) in-line comment level (default 40)
- Lisp-code Example:
(
...function - Block indentation level (default: 1, here: 3)
- Brace indentation level (currently unused)
- Label indentation level (currently unused)
- Continued statement level (currently unused)
(function
...arg - Continued equation level (default 1, here: 3)
....; xx - Standard comment level (default 4)
(xxx)....; x - (Absolute) in-line comment level (default 40)
'SMARTINDENT' command arguments:
Template: LINE/S,LASTLINE/S,CURSOR/S,BLOCK/S
LINE: Indent current line
LASTLINE: Indent the line one above the current line
CURSOR: Move cursor to last indentation position in this line
BLOCK: Indent marked block
BUGS
Yes, there are some bugs left, but only according to wrong indented
lines. So far smartindent V37.6 has not crashed my Amiga at all.
Read the comment at the beginning of test_input.c and test_correct.c for
more details.
HISTORY
V37.6 beta
- Some more indention bug fixes:
lines 164 166 178 181 198 of test_input.c are correct now.
- Added 'Lisp' indention mode (e.g. for Installer scripts)
- Corrected c semantics to more correctly interprete C++ code
(bug-report: Henning Tietgens, thanx!)
- Comments are no longer nested (bug-report: Marty King, thanx!)
- Configuration is now window-dependend and no longer global
- Some small other fixes
V37.5 beta
- Some more indention bug fixes.
- Bug fix in endless loop detection.
- Indenting code less often on pressing '/' or '*' now
(only when necessary for comment indention).
- Finally implemented routine dispatcher needed for multiple
indention modes.
V37.4 beta
- Some indention bug fixes. Should recognize all C++ words now.
V37.3 beta
- Loads of bug fixes, one even potentially harmfull
- 'test' smakefile target and test_input.c testing source file for
checking indention abilities.
V37.2 beta2
- Version information bug fixed. Installer should install the
API-client correctly now.
- Installer script reworked.
- New regedit for installation process provided. Thanx Dietmar!
V37.2 beta
- First release.
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
1233 595 51.7% 14-Dec-97 02:21:24 Smartindent.info
26760 12359 53.8% 14-Dec-97 02:21:36 +smartindent.api
25204 13517 46.3% 14-Dec-97 02:21:28 +regedit
17996 7017 61.0% 14-Dec-97 02:21:28 +COPYING
856 436 49.0% 14-Dec-97 02:21:24 +COPYING.info
3348 1254 62.5% 14-Dec-97 02:21:28 +Install
1608 1227 23.6% 14-Dec-97 02:21:24 +Install.info
507 256 49.5% 14-Dec-97 02:21:28 +Install_d.bat
507 256 49.5% 14-Dec-97 02:21:28 +Install_e.bat
97 78 19.5% 14-Dec-97 02:21:24 +c.api
64 64 0.0% 14-Dec-97 02:21:24 +c.indent
581 213 63.3% 14-Dec-97 02:21:24 +c.keyboard
1527 383 74.9% 14-Dec-97 02:21:24 +c.mouse
1501 369 75.4% 14-Dec-97 02:21:24 +c.mouse
5655 2508 55.6% 14-Dec-97 02:21:28 +Smartindent.readme
856 440 48.5% 14-Dec-97 02:21:24 +Smartindent.readme.info
1233 594 51.8% 14-Dec-97 02:21:24 +Source.info
3811 1234 67.6% 14-Dec-97 02:21:26 +compiler.h
856 490 42.7% 14-Dec-97 02:21:28 +compiler.h.info
6340 2265 64.2% 14-Dec-97 02:21:26 +dispatcher.c
856 490 42.7% 14-Dec-97 02:21:28 +dispatcher.c.info
835 352 57.8% 14-Dec-97 02:21:26 +dispatcher.h
856 490 42.7% 14-Dec-97 02:21:28 +dispatcher.h.info
3653 1439 60.6% 14-Dec-97 02:21:26 +LibFuncs.c
856 490 42.7% 14-Dec-97 02:21:28 +LibFuncs.c.info
1004 341 66.0% 14-Dec-97 02:21:26 +LibFuncs.h
856 490 42.7% 14-Dec-97 02:21:28 +LibFuncs.h.info
3823 1333 65.1% 14-Dec-97 02:21:26 +LibInit.c
856 490 42.7% 14-Dec-97 02:21:28 +LibInit.c.info
266 170 36.0% 14-Dec-97 02:21:26 +SCOPTIONS
856 434 49.2% 14-Dec-97 02:21:26 +SCOPTIONS.info
4189 1506 64.0% 14-Dec-97 02:21:26 +semantics.h
856 490 42.7% 14-Dec-97 02:21:28 +semantics.h.info
20308 4516 77.7% 14-Dec-97 02:21:26 +semantics_c.c
856 490 42.7% 14-Dec-97 02:21:28 +semantics_c.c.info
5302 1573 70.3% 14-Dec-97 02:21:26 +semantics_lisp.c
856 490 42.7% 14-Dec-97 02:21:28 +semantics_lisp.c.info
2596 936 63.9% 14-Dec-97 02:21:26 +smakefile
856 434 49.2% 14-Dec-97 02:21:26 +smakefile.info
4170 1557 62.6% 14-Dec-97 02:21:26 +smartindent.h
856 490 42.7% 14-Dec-97 02:21:28 +smartindent.h.info
5085 1477 70.9% 14-Dec-97 02:21:26 +StartUp.c
856 490 42.7% 14-Dec-97 02:21:28 +StartUp.c.info
6506 2277 65.0% 14-Dec-97 02:21:26 +test_correct.c
856 490 42.7% 14-Dec-97 02:21:26 +test_correct.c.info
1172 534 54.4% 14-Dec-97 02:21:26 +test_correct.lisp
856 434 49.2% 14-Dec-97 02:21:26 +test_correct.lisp.info
5810 2261 61.0% 14-Dec-97 02:21:26 +test_input.c
856 490 42.7% 14-Dec-97 02:21:28 +test_input.c.info
959 489 49.0% 14-Dec-97 02:21:26 +test_input.lisp
856 434 49.2% 14-Dec-97 02:21:26 +test_input.lisp.info
12673 4160 67.1% 14-Dec-97 02:21:26 +util.c
856 490 42.7% 14-Dec-97 02:21:28 +util.c.info
3628 1629 55.0% 14-Dec-97 02:21:26 +util.h
856 490 42.7% 14-Dec-97 02:21:28 +util.h.info
-------- ------- ----- --------- --------
197927 80701 59.2% 15-Dec-97 21:42:12 55 files